package com.singzi.javaSenior.classsLoader;

import org.junit.Test;

public class ClassLoaderTest {
    @Test
    public void test01() throws ClassNotFoundException {
        ClassLoader classLoader = ClassLoaderTest.class.getClassLoader();
        System.out.println(classLoader);
        ClassLoader parent = classLoader.getParent();
        System.out.println(parent);
        Class<?> aClass = classLoader.loadClass("com.singzi.javaSenior.classsLoader.ClassLoaderTest");
        System.out.println(aClass);
        ClassLoader parent1 = parent.getParent();
        System.out.println(parent1);
        ClassLoader classLoader1 = String.class.getClassLoader();
        System.out.println(classLoader1);
    }
}

